<template>
  <div>
    <el-button type="primary" @click="dialogFormVisible = true">
        {{ text }}
    </el-button>

    <el-dialog ref="div" :title="title" :visible.sync="dialogFormVisible">
      <slot></slot>

      <div>123</div>

      <div slot="footer" class="dialog-footer">
        
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="success"
          >确 定</el-button
        >
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: {
      text: {
          type: String,
          default: "默认"
      },
      title: {
          type: String,
          default: "默认Tiele"
      },
      myRef: {
          type: Object
      }
  },
  data() {
    return {
      dialogFormVisible: false,
      form: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
      },
      formLabelWidth: "120px",
    };
  },
  methods: {
      success() {
          this.dialogFormVisible = false
      }
  },
  mounted() {
      console.log(this.$refs.div.$slots.default[0].$children)
  }
};
</script>

<style>
</style>